<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>
<jsp:include page="head.htm" />
</head>
<body>
	<jsp:include page="loggedIn.jsp" />

	<div id="head">
		<h1>Zeiterfassung</h1>
	</div>
	<jsp:include page="menu.jsp" />
	<div id="content">
		<h2>
			<c:out value="${title}" />
		</h2>
		<a href="EditUrlaub.html" class="button">Urlaubsantrag</a>
		<br/>
		<br/>
		<table cellpadding="0" cellspacing="0" class="atag">
			<tr>
				<th></th>
				<th></th>
				<th>Urlaub von</th>
				<th>Urlaub bis</th>
				<th>genehmigt</th>
			</tr>
			<c:forEach items="${urlaub}" var="urlaub">
				<tr>
					<td><c:choose>
							<c:when test="${empty urlaub.urlaub_genehmigt}">
								<a href="EditUrlaub.html?id=<c:out value="${urlaub.id}"/>">
									<img src="images/edit_s.png"
									alt="Icon - Bearbeite Urlaubsantrag" />
								</a>
							</c:when>
						</c:choose></td>
					<td><c:choose>
							<c:when test="${empty urlaub.urlaub_genehmigt}">
								<a href="DeleteUrlaub.html?id=<c:out value="${urlaub.id}" />&m_id=<c:out value="${urlaub.mitarbeiter.id}" />">
								<img src="images/delete.png" alt="Icon - Lösche Urlaubsantrag" />
								</a>
							</c:when>
							<c:when test="${!urlaub.urlaub_genehmigt}">
								<a href="DeleteUrlaub.html?id=<c:out value="${urlaub.id}" />&m_id=<c:out value="${urlaub.mitarbeiter.id}" />">
								<img src="images/delete.png" alt="Icon - Lösche Urlaubsantrag" />
								</a>
							</c:when>
						</c:choose></td>
					<td><fmt:formatDate value="${urlaub.urlaub_von}" type="date" pattern="dd.MM.yyyy" /></td>
					<td><fmt:formatDate value="${urlaub.urlaub_bis}" type="date" pattern="dd.MM.yyyy" /></td>
					<td><c:choose>
							<c:when test="${urlaub.urlaub_genehmigt}">
								<font color="green"><c:out value="ja"></c:out></font>
							</c:when>
							<c:when test="${empty urlaub.urlaub_genehmigt}">
								<font color="orange"><c:out value="nicht bearbeitet"></c:out></font>
							</c:when>
							<c:when test="${!urlaub.urlaub_genehmigt}">
								<font color="red"><c:out value="nein"></c:out></font>
							</c:when>
						</c:choose></td>
				</tr>
			</c:forEach>
		</table>
	</div>
</body>
</html>
